import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

/* Layout */
import Layout from '@/layout/index.vue'

// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
}

export const commonRouters = [
    {
        path: '/login',
        hidden: true,
        meta: {title: '登录', icon: 'el-icon-ed-shouye', affix: true},
        component: () => import(/* webpackChunkName: "login" */ '@/views/login/login.vue')
    },

    {
        path: '/redirect',
        component: Layout,
        hidden: true,
        children: [
            {
                path: '/redirect/:path(.*)',
                component: () => import('@/views/redirect/index.vue')
            }
        ]
    },
    {
        path: '/error',
        component: Layout,
        hidden: true,
        children: [
            {
                path: '401',
                hidden: true,
                component: () => import('@/views/common/401/index.vue'),
                meta: {title: '无权限', icon: 'el-icon-if-caidan', affix: false}
            },
        ]
    },
    {
        path: '/bigScreen',
        name: 'bigScreen',
        hidden: true,
        meta: {title: '智能大屏', affix: false},
        component: () => import(/* webpackChunkName: "login" */ '@/views/bigScreen/index.vue')
    },
    {
        path: '/',
        component: Layout,
        redirect: '/dashboard',
        children: [
            {
                path: 'dashboard',
                component: () => import('@/views/dashboard/index.vue'),
                name: 'Dashboard',
                meta: {title: '首页', icon: 'el-icon-if-caidan', affix: true}
            },

        ]
    },
    {
        path: '/taskManage',
        component: Layout,
        hidden: true
    },
    {
        path: '/common',
        component: Layout,
        hidden: true,
        children: [
            {
                path: 'selfInfo',
                component: () => import('@/views/common/selfInfo.vue'),
                name: 'selfInfo',
                meta: {title: '个人中心', icon: 'el-icon-ed-shouye', affix: false},
            },
            {
                path: 'upPassword',
                component: () => import('@/views/common/upPassword.vue'),
                name: 'upPassword',
                meta: {title: '修改密码', icon: 'el-icon-if-mima', affix: false},
            },
            {
                path: 'upMobile',
                component: () => import('@/views/common/upMobile.vue'),
                name: 'upMobile',
                meta: {title: '修改手机号', icon: 'el-icon-if-mima', affix: false},
            },
            {
                path: 'bindOpenId',
                component: () => import('@/views/common/bindOpenId.vue'),
                name: 'bindOpenId',
                meta: {title: '绑定openId', icon: 'el-icon-if-mima', affix: false},
            },
            {
                path: 'selfNotice',
                component: () => import('@/views/common/selfNotice.vue'),
                name: 'selfNotice',
                meta: {title: '我的通知', icon: 'el-icon-if-mima', affix: false},
            },
            {
                path: 'sign',
                component: () => import('@/views/common/sign/list.vue'),
                name: 'sign',
                meta: {title: '签到管理', icon: 'el-icon-if-mima', affix: false},
            }
        ]
    },
    {
        path: '/nonEmergency',
        component: Layout,
        redirect: '/nonEmergency/nonEmergencyList',
        children: [
            {
                path: 'nonEmergencyList',
                component: () => import('@/views/nonEmergency/list.vue'),
                name: 'nonEmergency',
                meta: {title: '消防隐患', icon: 'el-icon-if-yichang', affix: false}
            },
            {
                path: 'nonEmergencyInfo/:ucId',
                component: () => import('@/views/nonEmergency/info.vue'),
                name: 'nonEmergency',
                hidden: true,
                meta: {
                    title: '消防隐患详情',
                    icon: 'el-icon-if-yichang',
                    affix: false,
                    parent: "/nonEmergency/nonEmergencyList"
                }
            },

            {
                path: 'hiddenDangerList',
                component: () => import('@/views/hiddenDanger/list.vue'),
                name: 'HiddenDangerList',
                meta: {title: '消防隐患', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'hiddenDangerEdit',
                component: () => import('@/views/hiddenDanger/edit.vue'),
                name: 'hiddenDangerEdit',
                hidden: true,
                meta: {
                    title: '消防隐患编辑',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/faultOrder/maintenanceList' "
                }
            },
            {
                path: 'hiddenDangerInfo',
                component: () => import('@/views/hiddenDanger/info.vue'),
                name: 'hiddenDangerInfo',
                hidden: true,
                meta: {
                    title: '消防隐患详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/faultOrder/maintenanceList'"
                }
            },
        ]
    },
    {
        path: '/personWork',
        component: Layout,
        redirect: '/personWork/list',
        children: [
            {
                path: 'list',
                component: () => import('@/views/personalWork/list.vue'),
                name: 'list',
                meta: {title: '个人工作', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'edit',
                component: () => import('@/views/personalWork/edit.vue'),
                name: 'edit',
                hidden: true,
                meta: {title: '编辑工单', icon: 'el-icon-if-renwuguanli',nocache: true, affix: false, parent: "/personWork/list' "}
            },
            {
                path: 'info',
                component: () => import('@/views/personalWork/info.vue'),
                name: 'info',
                hidden: true,
                meta: {title: '工单详情', icon: 'el-icon-if-renwuguanli', affix: false, parent: "/personWork/list'"}
            },
        ]
    },
    {
        path: '/inspect',
        component: Layout,
        redirect: '/inspect/list',
        children: [
            {
                path: 'list',
                component: () => import('@/views/inspect/list.vue'),
                name: 'list',
                meta: {title: '监督检查', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'edit/:ucId',
                component: () => import('@/views/inspect/edit.vue'),
                name: 'edit',
                hidden: true,
                meta: {title: '编辑监督检查', icon: 'el-icon-if-renwuguanli',nocache: true, affix: false, parent: "/inspect/list' "}
            },
            {
                path: 'info/:ucId',
                component: () => import('@/views/inspect/info.vue'),
                name: 'info',
                hidden: true,
                meta: {title: '监督检查详情', icon: 'el-icon-if-renwuguanli', affix: false, parent: "/inspect/list'"}
            },
        ]
    },
    {
        path: '/positioning',
        component: Layout,
        redirect: '/positioning/list',
        children: [
            {
                path: 'list',
                component: () => import('@/views/positioning/list.vue'),
                name: 'list',
                meta: {title: '定位管理', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'edit',
                component: () => import('@/views/positioning/edit.vue'),
                name: 'edit',
                hidden: true,
                meta: {title: '编辑定位', icon: 'el-icon-if-renwuguanli',nocache: true, affix: false, parent: "/positioning/list' "}
            },
            {
                path: 'info',
                component: () => import('@/views/positioning/info.vue'),
                name: 'info',
                hidden: true,
                meta: {title: '定位详情', icon: 'el-icon-if-renwuguanli', affix: false, parent: "/positioning/list'"}
            },
        ]
    },
    {
        path: '/order',
        component: Layout,
        redirect: '/order/maintenanceList',
        children: [
            {
                path: 'maintenanceList',
                component: () => import('@/views/maintenance/list.vue'),
                name: 'maintenanceList',
                meta: {title: '维保工单', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'maintenanceEdit/:ucId',
                component: () => import('@/views/maintenance/edit.vue'),
                name: 'maintenanceEdit',
                hidden: true,
                meta: {title: '编辑工单', icon: 'el-icon-if-renwuguanli',nocache: true, affix: false, parent: "/order/maintenanceList' "}
            },
            {
                path: 'maintenanceInfo/:ucId',
                component: () => import('@/views/maintenance/info.vue'),
                name: 'maintenanceInfo',
                hidden: true,
                meta: {title: '工单详情', icon: 'el-icon-if-renwuguanli', affix: false, parent: "/order/maintenanceList'"}
            },
        ]
    },
    {
        path: '/faultOrder',
        component: Layout,
        redirect: '/faultOrder/maintenanceList',
        children: [
            {
                path: 'maintenanceList',
                component: () => import('@/views/maintenance/list.vue'),
                name: 'maintenanceList',
                meta: {title: '故障工单', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'maintenanceEdit/:ucId',
                component: () => import('@/views/maintenance/edit.vue'),
                name: 'maintenanceEdit',
                hidden: true,
                meta: {
                    title: '故障工单',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/faultOrder/maintenanceList' "
                }
            },
            {
                path: 'maintenanceInfo/:ucId',
                component: () => import('@/views/maintenance/info.vue'),
                name: 'maintenanceInfo',
                hidden: true,
                meta: {
                    title: '故障详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/faultOrder/maintenanceList'"
                }
            },
        ]
    },
    {
        path: '/abnormal',
        component: Layout,
        redirect: '/abnormal/abnormalList',
        children: [
            {
                path: 'abnormalList',
                component: () => import('@/views/abnormal/list.vue'),
                name: 'abnormal',
                meta: {title: '流程异常', icon: 'el-icon-if-yichangliucheng', affix: false}
            },
            {
                path: 'abnormalEdit/:ucId',
                component: () => import('@/views/abnormal/edit.vue'),
                name: 'abnormal',
                hidden: true,
                meta: {
                    title: '流程异常编辑',
                    icon: 'el-icon-if-yichangliucheng',
                    nocache: true,
                    affix: false,
                    parent: "/abnormal/abnormalList"
                }
            },
            {
                path: 'abnormalInfo/:ucId',
                component: () => import('@/views/abnormal/info.vue'),
                name: 'abnormal',
                hidden: true,
                meta: {
                    title: '流程异常详情',
                    icon: 'el-icon-if-yichangliucheng',
                    affix: false,
                    parent: "/abnormal/abnormallist"
                },
            },
        ]
    },
    {
        path: '/channel',
        component: Layout,
        redirect: '/channel/channellist',
        children: [
            {
                path: 'channelList',
                component: () => import('@/views/channel/list.vue'),
                name: 'channelList',
                meta: {title: '信道管理', icon: 'el-icon-if-yichangliucheng', affix: false}
            },
        ]
    },
    {
        path: '/staff',
        component: Layout,
        redirect: '/staff/list',
        children: [
            {
                path: 'list',
                component: () => import('@/views/staff/list.vue'),
                name: 'list',
                meta: {title: '', icon: 'el-icon-if-yichangliucheng', affix: false}
            },
        ]
    },
    {
        path: '/notice',
        component: Layout,
        redirect: '/notice/noticeList',
        children: [

            {
                path: 'noticeList',
                component: () => import('@/views/notice/list.vue'),
                name: 'abnormal',
                meta: {title: '消息通知', icon: 'el-icon-if-tongzhi', affix: false}
            },
            {
                path: 'noticeEdit/:ucId',
                component: () => import('@/views/notice/edit.vue'),
                name: 'abnormal',
                hidden: true,
                meta: {title: '消息通知编辑', icon: 'el-icon-if-tongzhi',nocache: true, affix: false, parent: "/notice/noticeList"}
            },
            {
                path: 'noticeInfo/:ucId',
                component: () => import('@/views/notice/info.vue'),
                name: 'abnormal',
                hidden: true,
                meta: {title: '消息通知详情', icon: 'el-icon-if-tongzhi', affix: false, parent: "/notice/noticeList"}
            },
        ]
    },
    {
        path: '/enterprise',
        component: Layout,
        redirect: '/enterprise/list',
        meta: {title: '主体管理', icon: 'el-icon-if-qiye', affix: false},
        children: [
            {
                path: 'list',
                component: () => import('@/views/enterprise/enterprise/list.vue'),
                name: 'Enterprise',
                meta: {title: '主体管理', icon: 'el-icon-if-qiye', affix: false}
            },
            {
                path: 'grid',
                component: () => import('@/views/enterprise/grid/list.vue'),
                name: 'gridList',
                meta: {title: '巡区网格', icon: 'el-icon-s-grid', affix: false}
            },
            {
                path: 'enterpriseedit/:ucId',
                component: () => import('@/views/enterprise/enterprise/edit.vue'),
                name: 'EnterpriseEdit',
                hidden: true,
                meta: {title: '主体编辑', icon: 'el-icon-if-qiye',nocache:true, affix: false, parent: '/enterprise/list'}
            },
            {
                path: 'enterpriseinfo/:ucId',
                component: () => import('@/views/enterprise/enterprise/info.vue'),
                name: 'EnterpriseInfo',
                hidden: true,
                meta: {title: '主体详情', icon: 'el-icon-if-qiye', affix: false, parent: '/enterprise/list'}
            },
            {
                path: 'building',
                component: () => import('@/views/enterprise/building/list.vue'),
                name: 'Building',
                meta: {title: '建筑管理', icon: 'el-icon-if-jianzhuwuguanli', affix: false}
            },
            {
                path: 'building/edit',
                component: () => import('@/views/enterprise/building/edit.vue'),
                name: 'BuildingEdit',
                hidden: true,
                meta: {title: '建筑编辑', icon: 'el-icon-if-jianzhuwuguanli',nocache:true, affix: false, parent: '/enterprise/building'}
            },
            {
                path: 'building/info',
                component: () => import('@/views/enterprise/building/info.vue'),
                name: 'BuildingInfo',
                hidden: true,
                meta: {title: '建筑详情', icon: 'el-icon-if-jianzhuwuguanli', affix: false, parent: '/enterprise/building'}
            },
            {
                path: 'region',
                component: () => import('@/views/enterprise/region/list.vue'),
                name: 'region',
                meta: {title: '区域管理', icon: 'el-icon-if-quyu', affix: false}
            },
            {
                path: 'region/edit',
                component: () => import('@/views/enterprise/region/edit.vue'),
                name: 'regionREdit',
                meta: {title: '区域编辑', icon: 'el-icon-if-quyu',nocache:true, affix: false, parent: '/enterprise/region'}
            },
            {
                path: 'hostList',
                component: () => import('@/views/enterprise/host/list.vue'),
                name: 'hostList',
                meta: {title: '主机管理', icon: 'el-icon-if-qiye', affix: false}
            },
            {
                path: 'hostEdit',
                component: () => import('@/views/enterprise/host/edit.vue'),
                name: 'hostEdit',
                hidden: true,
                meta: {title: '主机详情', icon: 'el-icon-if-qiye',nocache: true, affix: false, parent: '/enterprise/hostList'}
            },
            {
                path: 'hostInfo',
                component: () => import('@/views/enterprise/host/info.vue'),
                name: 'hostInfo',
                hidden: true,
                meta: {title: '主机编辑', icon: 'el-icon-if-qiye', affix: false, parent: '/enterprise/hostList'}
            },
            {
                path: 'region/info',
                component: () => import('@/views/enterprise/region/info.vue'),
                name: 'regionREdit',
                meta: {title: '区域详情', icon: 'el-icon-if-quyu',nocache: true, affix: false, parent: '/enterprise/region'}
            },
            {
                path: 'abnormalEnterpriseList',
                component: () => import('@/views/enterprise/abnormalEnterpriseList.vue'),
                name: 'abnormalEnterpriseList',
                meta: {title: '企业异常', icon: 'el-icon-if-quyu', affix: false}
            },
            {
                path: 'inFireproofRegion',
                component: () => import('@/views/enterprise/inFireproofRegion/list.vue'),
                name: 'inFireproofRegion',
                meta: {title: '防火区域', icon: 'el-icon-if-jianzhuwuguanli', affix: false}
            },
            {
                path: 'inFireproofRegionEdit/:ucId',
                component: () => import('@/views/enterprise/inFireproofRegion/edit.vue'),
                name: 'inFireproofRegionEdit',
                hidden: true,
                meta: {
                    title: '防火区域编辑',
                    icon: 'el-icon-if-jianzhuwuguanli',
                    nocache: true,
                    affix: false,
                    parent: '/enterprise/inFireproofRegion'
                }
            },
            {
                path: 'inFireproofRegionInfo/:ucId',
                component: () => import('@/views/enterprise/inFireproofRegion/info.vue'),
                name: 'inFireproofRegionInfo',
                hidden: true,
                meta: {
                    title: '防火区域详情',
                    icon: 'el-icon-if-jianzhuwuguanli',
                    affix: false,
                    parent: '/enterprise/inFireproofRegion'
                }
            },
        ]
    },
    {
        path: '/workOrder',
        component: Layout,
        redirect: '/workOrder/faultList',
        meta: {title: '工单管理', icon: 'el-icon-if-gongdan', affix: false},
        children: [
            {
                path: 'faultList',
                component: () => import('@/views/workOrder/fault/list.vue'),
                name: 'faultList',
                meta: {title: '故障工单', icon: 'el-icon-if-guzhanggongdan', affix: false}
            },
            {
                path: 'faultEdit',
                component: () => import('@/views/workOrder/fault/edit.vue'),
                name: 'faultEdit',
                hidden: true,
                meta: {title: '故障工单编辑', icon: 'el-icon-if-guzhanggongdan',nocache: true, affix: false, parent: "/workOrder/faultList"}
            },
            {
                path: 'faultInfo',
                component: () => import('@/views/workOrder/fault/info.vue'),
                name: 'faultInfo',
                hidden: true,
                meta: {
                    title: '故障工单详情',
                    icon: 'el-icon-if-guzhanggongdan',
                    affix: false,
                    parent: "/workOrder/faultList"
                },
            },
            {
                path: 'maintenanceList',
                component: () => import('@/views/workOrder/maintenance/list.vue'),
                name: 'maintenanceOrderList',
                meta: {title: '维保工单', icon: 'el-icon-if-weibaogongdan', affix: false}
            },
            {
                path: 'maintenanceEdit',
                component: () => import('@/views/workOrder/maintenance/edit.vue'),
                name: 'maintenanceOrderEdit',
                hidden: true,
                meta: {
                    title: '维保工单编辑',
                    icon: 'el-icon-if-weibaogongdan',
                    nocache: true,
                    affix: false,
                    parent: "/workOrder/maintenanceList"
                }
            },
            {
                path: 'maintenanceInfo',
                component: () => import('@/views/workOrder/maintenance/info.vue'),
                name: 'maintenanceOrderInfo',
                hidden: true,
                meta: {
                    title: '维保工单详情',
                    icon: 'el-icon-if-weibaogongdan',
                    affix: false,
                    parent: "/workOrder/maintenanceList"
                },
            },
        ]
    },
    {
        path: '/fairyTale',
        component: Layout,
        redirect: '/fairyTale/launchVideo',
        meta: {title: '视频通话', icon: 'el-icon-if-gongdan', affix: false},
        children: [
            {
                path: 'launchVideo',
                component: () => import('@/views/fairyTale/launchVideo.vue'),
                name: 'launchVideo',
                meta: {title: '视频通话', icon: 'el-icon-if-guzhanggongdan', affix: false}
            },
        ]
    },
    {
        path: '/video',
        component: Layout,
        hidden: true,
        redirect: '/video/launchVideo',
        meta: {title: '视频通话', icon: 'el-icon-if-gongdan', affix: false},
        children: [
            {
                path: 'launchVideo',
                component: () => import('@/views/video/index.vue'),
                name: 'launchVideo',
                meta: {title: '视频通话', icon: 'el-icon-if-guzhanggongdan', affix: false}
            },
        ]
    },
    {
        path: '/drillTips',
        component: Layout,
        hidden: true,
        redirect: '/drillTips/drill',
        children: [
            {
                path: 'drill',
                component: () => import('@/views/fireAlarm/drillTips.vue'),
                name: 'drill',
                meta: {title: '演练提示', icon: 'el-icon-if-guzhanggongdan', affix: false}
            },
        ]
    },
    {
        path: '/fireAlarm',
        component: Layout,
        redirect: '/fireAlarm/fireInfo',
        meta: {title: '火情信息', icon: 'el-icon-if-wangzhantubiaoji2_huaban1', affix: false},
        children: [
            //火情预警
            {
                path: 'info',
                component: () => import('@/views/fireAlarm/info/list.vue'),
                name: 'FireAlarmInfo',
                meta: {title: '火情预警', icon: 'el-icon-if-jingbao_d', affix: false}
            },
            {
                path: 'infoEdit/:ucId',
                component: () => import('@/views/fireAlarm/info/edit.vue'),
                name: 'FireAlarmInfoEdit',
                hidden: true,
                meta: {title: '火情预警编辑 ', icon: 'el-icon-if-jingbao_d',nocache: true, affix: false, parent: '/fireAlarm/info'}
            },
            {
                path: 'infoInfo/:ucId',
                component: () => import('@/views/fireAlarm/info/info.vue'),
                name: 'FireAlarmInfoInfo',
                hidden: true,
                meta: {title: '火情预警详情', icon: 'el-icon-if-jingbao_d', affix: false, parent: '/fireAlarm/info'}
            },
            {
                path: 'infoPublish',
                component: () => import('@/views/fireAlarm/info/publish.vue'),
                name: 'Publish',
                hidden: true,
                meta: {title: '分配预警信息', icon: 'el-icon-if-jingbao_d', affix: false, parent: '/fireAlarm/info'}
            },
            // 火情信息
            {
                path: 'fireInfo',
                component: () => import('@/views/fireAlarm/fireInfo/list.vue'),
                name: 'FireInfo',
                meta: {title: '火情信息', icon: 'el-icon-if-huoqingxinxi', affix: false}
            },
            {
                path: 'fireInfoEdit',
                component: () => import('@/views/fireAlarm/fireInfo/edit.vue'),
                name: 'FireInfoEdit',
                hidden: true,
                meta: {title: '火情信息编辑 ', icon: 'el-icon-if-huoqingxinxi',nocache: true, affix: false, parent: '/fireAlarm/fireInfo'}
            },
            {
                path: 'fireInfoInfo/:ucId',
                component: () => import('@/views/fireAlarm/fireInfo/info.vue'),
                name: 'FireInfoInfo',
                hidden: true,
                meta: {title: '火情信息详情', icon: 'el-icon-if-huoqingxinxi', affix: false, parent: '/fireAlarm/fireInfo'}
            },
            {
                path: 'simulationDrillList',
                component: () => import('@/views/fireAlarm/drillInfo/list.vue'),
                name: 'simulationDrillList',
                meta: {title: '演练信息', icon: 'el-icon-if-huoqingxinxi', affix: false}
            },
            {
                path: 'simulationDrillInfo/:ucId',
                component: () => import('@/views/fireAlarm/drillInfo/info.vue'),
                name: 'simulationDrillInfo',
                hidden: true,
                meta: {
                    title: '演练信息详情',
                    icon: 'el-icon-if-huoqingxinxi',
                    affix: false,
                    parent: '/fireAlarm/simulationDrillList'
                }
            },
            //报警记录
            {
                path: 'alarmRecord',
                component: () => import('@/views/fireAlarm/alarmRecord/list.vue'),
                name: 'alarmRecord',
                meta: {title: '报警记录', icon: 'el-icon-if-huoqingxinxi', affix: false}
            },
            {
                path: 'alarmRecordEdit',
                component: () => import('@/views/fireAlarm/alarmRecord/edit.vue'),
                name: 'alarmRecordEdit',
                hidden: true,
                meta: {
                    title: '报警记录编辑 ',
                    icon: 'el-icon-if-huoqingxinxi',
                    nocache: true,
                    affix: false,
                    parent: '/fireAlarm/alarmRecordInfo'
                }
            },
            {
                path: 'alarmRecordInfo/:ucId',
                component: () => import('@/views/fireAlarm/alarmRecord/info.vue'),
                name: 'alarmRecordInfo',
                hidden: true,
                meta: {
                    title: '报警记录详情',
                    icon: 'el-icon-if-huoqingxinxi',
                    affix: false,
                    parent: '/fireAlarm/alarmRecordInfo'
                }
            },
            //演练记录
            {
                path: 'drillList',
                component: () => import('@/views/fireAlarm/drill/list.vue'),
                name: 'drillList',
                meta: {title: '演练记录', icon: 'el-icon-if-huoqingxinxi', affix: false}
            },
            {
                path: 'drillInfo/:ucId',
                component: () => import('@/views/fireAlarm/drill/info.vue'),
                name: 'drillInfo',
                hidden: true,
                meta: {title: '演练记录详情', icon: 'el-icon-if-huoqingxinxi', affix: false, parent: '/fireAlarm/drillList'}
            },
        ]
    },
    {
        path: '/equipment',
        component: Layout,
        redirect: '/equipment/equipment',
        meta: {title: '设备管理', icon: 'el-icon-if-shebeiguanli', affix: false},
        children: [
            {
                path: 'equipment',
                component: () => import('@/views/equipment/equipment/list.vue'),
                name: 'Equipment',
                meta: {title: '设备管理', icon: 'el-icon-if-shebeiguanli', affix: false}
            },
            {
                path: 'equipmentEdit/:ucId',
                component: () => import('@/views/equipment/equipment/edit.vue'),
                name: 'EquipmentEdit',
                hidden: true,
                meta: {title: '设备编辑', icon: 'el-icon-if-shebeiguanli',nocache: true, affix: false, parent: '/equipment/equipment'}
            },
            {
                path: 'equipmentInfo/:ucId',
                component: () => import('@/views/equipment/equipment/info.vue'),
                name: 'EquipmentInfo',
                hidden: true,
                meta: {title: '设备详情', icon: 'el-icon-if-shebeiguanli', affix: false, parent: '/equipment/equipment'}
            },
            {
                path: 'inEquipmentMonitor',
                component: () => import('@/views/equipment/monitoring/list.vue'),
                name: 'inEquipmentMonitor',
                meta: {title: '监控管理', icon: 'el-icon-if-xunjianjilu', affix: false}
            },
            {
                path: 'inEquipmentMonitorEdit/:ucId',
                component: () => import('@/views/equipment/monitoring/edit.vue'),
                hidden: true,
                name: 'inEquipmentMonitorEdit',
                meta: {
                    title: '监控编辑',
                    icon: 'el-icon-if-xunjianjilu',
                    nocache: true,
                    affix: false,
                    parent: '/equipment/inEquipmentMonitor'
                }
            },
            //设备区域
            {
                path: 'region',
                component: () => import('@/views/equipment/region/list.vue'),
                name: 'regionList',
                meta: {title: '任务区域', icon: 'el-icon-if-weibao', affix: false}
            },
            {
                path: 'regionEdit/:ucId',
                component: () => import('@/views/equipment/region/edit.vue'),
                name: 'regionEdit',
                hidden: true,
                meta: {title: '任务区域编辑', icon: 'el-icon-if-qiye',nocache:true, affix: false, parent: '/equipment/region'}
            },
            {
                path: 'regionInfo/:ucId',
                component: () => import('@/views/equipment/region/info.vue'),
                name: 'MaintenanceInfo',
                hidden: true,
                meta: {title: '任务区域详情', icon: 'el-icon-if-qiye', affix: false, parent: '/equipment/region'}
            },
            {
                path: 'realTimeData',
                component: () => import('@/views/equipment/realTimeData/list.vue'),
                name: 'realTimeData',
                meta: {title: '实时数据', icon: 'el-icon-if-weibao', affix: false}
            },
            {
                path: 'video',
                component: () => import('@/views/equipment/video/list.vue'),
                name: 'Maintenance',
                meta: {title: '视频监控', icon: 'el-icon-if-weibao', affix: false}
            },
            {
                path: 'test',
                component: () => import('@/views/equipment/test.vue'),
                name: 'test',
                meta: {title: '测试', icon: 'el-icon-if-weibao', affix: false}
            },
            {
                path: 'measuringEqu',
                component: () => import('@/views/equipment/measuring/list.vue'),
                name: 'measuringEqu',
                meta: {title: '检测设备', icon: 'el-icon-if-shebeiguanli', affix: false}
            },
            {
                path: 'measuringEquEdit/:ucId',
                component: () => import('@/views/equipment/measuring/edit.vue'),
                name: 'measuringEquEdit',
                hidden: true,
                meta: {
                    title: '检测设备编辑',
                    icon: 'el-icon-if-shebeiguanli',
                    nocache: true,
                    affix: false,
                    parent: '/equipment/equipment/measuring/list.vue'
                }
            },
            {
                path: 'measuringEquInfo',
                component: () => import('@/views/equipment/measuring/info.vue'),
                name: 'measuringEquInfo',
                hidden: true,
                meta: {
                    title: '检测设备详情',
                    icon: 'el-icon-if-shebeiguanli',
                    nocache: true,
                    affix: false,
                    parent: '/equipment/equipment/measuring/list.vue'
                }
            }
        ]
    },
    {
        path: '/taskManage',
        component: Layout,
        redirect: '/taskManage/task',
        meta: {title: '任务管理', icon: 'el-icon-if-renwuguanli', affix: false},
        children: [
            {
                path: 'task',
                component: () => import('@/views/enterpriseTask/task/list.vue'),
                name: 'task',
                meta: {title: '任务列表', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'task/edit/:ucId',
                component: () => import('@/views/enterpriseTask/task/edit.vue'),
                name: 'taskEdit',
                hidden: true,
                meta: {title: '任务编辑', icon: 'el-icon-if-renwuguanli',noCache: true, affix: false, parent: "/taskManage/task"}
            },
            {
                path: 'task/info/:ucId',
                component: () => import('@/views/enterpriseTask/task/info.vue'),
                name: 'taskInfo',
                hidden: true,
                meta: {title: '任务详情', icon: 'el-icon-if-renwuguanli', affix: false, parent: "/taskManage/task"}
            },
            {
                path: 'taskType',
                component: () => import('@/views/task/taskType/list.vue'),
                name: 'taskType',
                meta: {title: '任务类型', icon: 'el-icon-if-meirirenwu1', affix: false}
            },
            {
                path: 'patrolTask',
                component: () => import('@/views/task/patrolTask/list.vue'),
                name: 'patrolTask',
                meta: {title: '巡检任务', icon: 'el-icon-if-meirirenwu1', affix: false}
            },
            {
                path: 'dailyTasks',
                component: () => import('@/views/task/dailyTasks/list.vue'),
                name: 'DailyTasks',
                meta: {title: '每日任务', icon: 'el-icon-if-meirirenwu1', affix: false}
            },
            {
                path: 'dailyTasksEdit/:ucId',
                component: () => import('@/views/task/dailyTasks/edit.vue'),
                name: 'DailyTasksEdit',
                hidden: true,
                meta: {title: '每日任务编辑', icon: 'el-icon-if-meirirenwu1',nocache: true, affix: false, parent: "/taskManage/dailyTasks"}
            },
            {
                path: 'inspectionRecord',
                component: () => import('@/views/task/inspectionRecord/list.vue'),
                name: 'inspectionRecord',
                meta: {title: '巡检记录', icon: 'el-icon-if-meirirenwu1', affix: false}
            },
            {
                path: 'inspectionRecordInfo/:ucId',
                component: () => import('@/views/task/inspectionRecord/info.vue'),
                name: 'inspectionRecordInfo',
                hidden: true,
                meta: {title: '巡检记录详情', icon: 'el-icon-if-meirirenwu1', affix: false, parent: "/taskManage/dailyTasks"}
            },
            {
                path: 'dailyTasksInfo',
                component: () => import('@/views/task/dailyTasks/info.vue'),
                name: 'DailyTasksInfo',
                hidden: true,
                meta: {title: '每日任务详情', icon: 'el-icon-if-meirirenwu1', affix: false, parent: "/taskManage/dailyTasks"}
            },
            {
                path: 'temporaryTasksEdit',
                component: () => import('@/views/task/dailyTasks/taskEdit.vue'),
                name: 'TemporaryTasksEdit',
                hidden: true,
                meta: {title: '临时任务添加', icon: 'el-icon-if-meirirenwu1',nocache: true, affix: false, parent: "/taskManage/dailyTasks"}
            },
            {
                path: 'signList',
                component: () => import('@/views/task/dailyTasks/sign/list.vue'),
                name: 'InFireCompanyList',
                hidden: true,
                meta: {title: '巡检签到', icon: 'el-icon-if-xiaofang', affix: false}
            },
            {
                path: 'signEdit/:id',
                component: () => import('@/views/task/dailyTasks/sign/signEdit.vue'),
                name: 'InFireCompanyEdit',
                hidden: true,
                meta: {title: '巡检签到编辑', icon: 'el-icon-if-xiaofang',nocache: true, affix: false, parent: "/taskManage/signList"}
            },
            {
                path: 'signInfo/:id',
                component: () => import('@/views/task/dailyTasks/sign/signInfo.vue'),
                name: 'InFireCompanyInfo',
                hidden: true,
                meta: {title: '巡检签到详情', icon: 'el-icon-if-xiaofang', affix: false, parent: "/taskManage/signList"}
            },

            {
                path: 'agencyList',
                component: () => import('@/views/task/agency/list.vue'),
                name: 'agencyList',
                hidden: true,
                meta: {title: '待办事项', icon: 'el-icon-if-xiaofang', affix: false}
            },
            {
                path: 'agencyInfo',
                component: () => import('@/views/task/agency/info.vue'),
                name: 'agencyInfo',
                hidden: true,
                meta: {title: '待办事项详情', icon: 'el-icon-if-xiaofang', affix: false, parent: "/taskManage/agencyList"}
            },
        ]
    },
    {
        path: '/securityAlarm',
        component: Layout,
        redirect: '/securityAlarm',
        meta: {title: '安全预警', icon: 'el-icon-if-renwuguanli', affix: false},
        children: [
            {
                path: 'camera',
                component: () => import('@/views/camera/list.vue'),
                name: 'camera',
                meta: {title: '视频设备管理', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'cameraedit/:ucId',
                component: () => import('@/views/camera/edit.vue'),
                name: 'cameraedit',
                hidden: true,
                meta: {
                    title: '视频设备编辑',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/securityAlarm/camera"
                }
            },
            {
                path: 'camerainfo/:ucId',
                component: () => import('@/views/camera/info.vue'),
                name: 'datainfo',
                hidden: true,
                meta: {
                    title: '视频设备详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/securityAlarm/camera"
                }
            },
            {
                path: 'warning',
                component: () => import('@/views/securityAlarm/list.vue'),
                name: 'warning',
                meta: {title: '安全预警管理', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'warningInfo/:ucId',
                component: () => import('@/views/securityAlarm/info.vue'),
                name: 'warningInfo',
                hidden: true,
                meta: {
                    title: '安全预警详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/securityAlarm/warning"
                }
            },
        ]
    },
    {
        path: '/maintenance',
        component: Layout,
        redirect: '/maintenance',
        meta: {title: '维保管理', icon: 'el-icon-if-renwuguanli', affix: false},
        children: [
            {
                path: 'contract',
                component: () => import('@/views/contract/list.vue'),
                name: 'contract',
                meta: {title: '合同管理', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'dataedit/:id',
                component: () => import('@/views/contract/edit.vue'),
                name: 'dataedit',
                hidden: true,
                meta: {
                    title: '维保合同编辑',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/maintenance/contract"
                }
            },
            {
                path: 'datainfo/:id',
                component: () => import('@/views/contract/info.vue'),
                name: 'datainfo',
                hidden: true,
                meta: {
                    title: '维保合同编辑',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/maintenance/contract"
                }
            },
            {
                path: 'maintenanceTaskList',
                component: () => import('@/views/maintenance/maintenanceTask/list.vue'),
                name: 'recordsList',
                meta: {title: '维保任务', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'maintenanceTaskEdit/:ucId',
                component: () => import('@/views/maintenance/maintenanceTask/edit.vue'),
                name: 'maintenanceTaskEdit',
                hidden: true,
                meta: {
                    title: '维保任务编辑',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/maintenance/maintenanceTaskList"
                }
            },
            {
                path: 'maintenanceTaskInfo',
                component: () => import('@/views/maintenance/maintenanceTask/info.vue'),
                name: 'maintenanceTaskInfo',
                hidden: true,
                meta: {
                    title: '维保记录详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "maintenance/maintenanceTaskList"
                }
            },

            {
                path: 'recordsList',
                component: () => import('@/views/maintenance/records/list.vue'),
                name: 'recordsList',
                meta: {title: '维保记录', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'recordsEdit',
                component: () => import('@/views/maintenance/records/edit.vue'),
                name: 'recordsEdit',
                hidden: true,
                meta: {title: '编辑维保记录', icon: 'el-icon-if-renwuguanli',nocache: true, affix: false}
            },
            {
                path: 'recordsInfo',
                component: () => import('@/views/maintenance/records/info.vue'),
                name: 'recordsInfo',
                hidden: true,
                meta: {title: '维保记录详情', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'checkRecordsList',
                component: () => import('@/views/maintenance/checkRecords/list.vue'),
                name: 'recordsList',
                meta: {title: '考核记录', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'checkRecordsEdit',
                component: () => import('@/views/maintenance/checkRecords/edit.vue'),
                name: 'recordsEdit',
                hidden: true,
                meta: {
                    title: '编辑维保考核记录',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/maintenance/checkRecordsList"
                }
            },
            {
                path: 'checkRecordsInfo',
                component: () => import('@/views/maintenance/checkRecords/info.vue'),
                name: 'recordsInfo',
                hidden: true,
                meta: {
                    title: '维保考核记录详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/maintenance/checkRecordsList"
                }
            },
            {
                path: 'camera',
                component: () => import('@/views/camera/list.vue'),
                name: 'camera',
                meta: {title: '视频设备管理', icon: 'el-icon-if-renwuguanli', affix: false}
            },
            {
                path: 'cameraedit/:id',
                component: () => import('@/views/camera/edit.vue'),
                name: 'cameraedit',
                hidden: true,
                meta: {
                    title: '视频设备编辑',
                    icon: 'el-icon-if-renwuguanli',
                    nocache: true,
                    affix: false,
                    parent: "/maintenance/contract"
                }
            },
            {
                path: 'camerainfo/:id',
                component: () => import('@/views/camera/info.vue'),
                name: 'datainfo',
                hidden: true,
                meta: {
                    title: '视频设备详情',
                    icon: 'el-icon-if-renwuguanli',
                    affix: false,
                    parent: "/maintenance/contract"
                }
            },
        ]
    },
    {
        path: '/sys',
        component: Layout,
        redirect: '/sys/user',
        meta: {title: '系统设置', icon: 'el-icon-if-xitong', affix: false},
        children: [
            {
                path: 'settings',
                component: () => import('@/views/sysconfig/dynamicConfig/settings_bak.vue'),
                name: 'settings',
                meta: {title: '动态配置', icon: 'el-icon-if-shezhi', affix: false}
            },
            {
                path: 'three',
                component: () => import('@/views/three/storey.vue'),
                name: 'three',
                meta: {title: '3D展示', icon: 'el-icon-if-shezhi', affix: false}
            },
            {
                path: 'cycle',
                component: () => import('@/views/sysconfig/cycle/list.vue'),
                name: 'cycle',
                meta: {title: '设备维保周期配置', icon: 'el-icon-if-shezhi', affix: false}
            },

            {
                path: 'cycleEdit/:ucId',
                component: () => import('@/views/sysconfig/cycle/edit.vue'),
                name: 'cycleEdit',
                hidden: true,
                meta: {title: '设备维保周期配置编辑', icon: 'el-icon-if-yuangong',nocache: true, affix: false, parent: '/sys/cycle'}
            },
            {
                path: 'cycleInfo/:ucId',
                component: () => import('@/views/sysconfig/cycle/info.vue'),
                name: 'cycleEdit',
                hidden: true,
                meta: {title: '设备维保周期配置详情', icon: 'el-icon-if-yuangong',nocache: true, affix: false, parent: '/sys/cycle'}
            },
            {
                path: 'equipmentType',
                component: () => import('@/views/sysconfig/equipmentType/list.vue'),
                name: 'equipmentType',
                meta: {title: '设备类型', icon: 'el-icon-if-shezhi', affix: false}
            },
            {
                path: 'equipmentTypeEdit/:ucId',
                component: () => import('@/views/sysconfig/equipmentType/edit.vue'),
                name: 'equipmentTypeEdit',
                hidden: true,
                meta: {title: '设备类型编辑', icon: 'el-icon-if-yuangong',nocache: true, affix: false, parent: '/sys/equipmentType'}
            },
            {
                path: 'dict',
                component: () => import('@/views/sysconfig/dict/index.vue'),
                name: 'dict',
                meta: {title: '数据字典', icon: 'el-icon-if-shezhi', affix: false}
            },
            {
                path: 'user',
                component: () => import('@/views/enterprise/user/list.vue'),
                name: 'User',
                meta: {title: '用户管理', icon: 'el-icon-if-yuangong', affix: false}
            },
            {
                path: 'apkVersion',
                component: () => import('@/views/apkVersion/list.vue'),
                name: 'apkVersion',
                meta: {title: 'APK版本管理', icon: 'el-icon-if-yuangong', affix: false}
            },
            {
                path: 'apkedit/:ucId',
                component: () => import('@/views/apkVersion/edit.vue'),
                name: 'apkedit',
                hidden: true,
                meta: {title: 'APK版本编辑', icon: 'el-icon-if-yuangong',nocache: true, affix: false, parent: '/sys/apkVersion'}
            },
            {
                path: 'apkinfo/:ucId',
                component: () => import('@/views/apkVersion/info.vue'),
                name: 'apkinfo',
                hidden: true,
                meta: {title: 'APK版本详情', icon: 'el-icon-if-yuangong', affix: false, parent: '/sys/apkVersion'}
            },
            {
                path: 'useredit/:ucId',
                component: () => import('@/views/enterprise/user/edit.vue'),
                name: 'UserEdit',
                hidden: true,
                meta: {title: '用户编辑', icon: 'el-icon-if-yuangong',nocache: true, affix: false, parent: '/enterprise/user'}
            },
            {
                path: 'userinfo/:ucId',
                component: () => import('@/views/enterprise/user/info.vue'),
                name: 'UserInfo',
                hidden: true,
                meta: {title: '用户详情', icon: 'el-icon-if-yuangong', affix: false, parent: '/enterprise/user'}
            },
            {
                path: 'role',
                component: () => import('@/views/sysconfig/role/list.vue'),
                name: 'role',
                meta: {title: '角色管理', icon: 'el-icon-if-jiaoseguanli', affix: false}
            },
            {
                path: 'role/edit',
                component: () => import('@/views/sysconfig/role/edit.vue'),
                name: 'roleEdit',
                hidden: true,
                meta: {title: '角色编辑', icon: 'el-icon-if-jiaoseguanli',nocache: true, affix: false, parent: '/sys/role'}
            },
            {
                path: 'role/info',
                component: () => import('@/views/sysconfig/role/info.vue'),
                name: 'RoleInfo',
                hidden: true,
                meta: {title: '角色详情', icon: 'el-icon-if-jiaoseguanli', affix: false, parent: '/sys/role'}
            },
            {
                path: 'permission',
                component: () => import('@/views/sysconfig/permission/list.vue'),
                name: 'permissionList',
                meta: {title: '菜单管理', icon: 'el-icon-if-ziyuan', affix: false}
            },
            {
                path: 'permissionedit/:ucId',
                component: () => import('@/views/sysconfig/permission/edit.vue'),
                name: 'permissionEdit',
                hidden: true,
                meta: {title: '菜单编辑', icon: 'el-icon-if-ziyuan',nocache: true, affix: false, parent: '/sys/permission'}
            },
            {
                path: 'log',
                component: () => import('@/views/sysconfig/log/list.vue'),
                name: 'logList',
                meta: {title: '操作记录', icon: 'el-icon-if-ziyuan', affix: false}
            },
            {
                path: 'log/info',
                component: () => import('@/views/sysconfig/log/info.vue'),
                name: 'logEdit',
                hidden: true,
                meta: {title: '操作记录详情', icon: 'el-icon-if-ziyuan', affix: false, parent: '/sys/log/list'}
            },
            {
                path: 'box',
                component: () => import('@/views/sysconfig/inBox/list.vue'),
                name: 'box',
                meta: {title: '盒子管理', icon: 'el-icon-if-guanliyuan', affix: false}
            },
            {
                path: 'boxEdit/:id',
                component: () => import('@/views/sysconfig/inBox/edit.vue'),
                name: 'boxEdit',
                hidden: true,
                meta: {title: '盒子编辑', icon: 'el-icon-if-guanliyuan',nocache: true, affix: false, parent: '/sysconfig/inBox'}
            },
            {
                path: 'job',
                component: () => import('@/views/job/index.vue'),
                name: 'Job',
                meta: {title: '定时任务', affix: false}
            },
            {
                path: 'jobLog',
                component: () => import('@/views/job/log.vue'),
                name: 'JobLog',
                meta: {title: '定时任务日志', affix: false}
            }, {
                path: 'post',
                component: () => import('@/views/post/list.vue'),
                name: 'post',
                meta: {title: '岗位管理', affix: false}
            },
            {
                path: 'post/edit',
                component: () => import('@/views/post/edit.vue'),
                name: 'postEdit',
                hidden: true,
                meta: {title: '岗位编辑', icon: 'el-icon-if-jiaoseguanli',nocache: true, affix: false}
            },
        ]
    },
    {
        path: '/statis',
        component: Layout,
        redirect: '/statis/monthReport',
        meta: {title: '统计分析', icon: '', affix: false},
        children: [
            {
                path: 'monthReport',
                component: () => import('@/views/statis/monthReport.vue'),
                name: 'monthReport',
                meta: {title: '月度工作报告', icon: '', affix: false}
            }
        ]
    },
    {
        path: '/examine',
        component: Layout,
        redirect: '/examine/contract',
        meta: {title: '检测管理', icon: '', affix: false},
        children: [
            {
                path: 'contract',
                component: () => import('@/views/examine/contract/list.vue'),
                name: 'contract',
                meta: {title: '检测合同', icon: '', affix: false}
            },{
                path: 'task',
                component: () => import('@/views/examine/examineTask/list.vue'),
                name: 'examineTask',
                meta: {title: '检测任务', icon: '', affix: false}
            }
        ]
    },
]

const createRouter = () => new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: commonRouters
})

const router = createRouter()

export function resetRouter() {
    const newRouter = createRouter()
    router.matcher = newRouter.matcher // reset router
}


export default router
